﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoNetApplication.Common.Helper;

namespace VideoNetApplication.Common.Dao
{
  public  class AdminUserDao
  {
      private EVDBEntities entities = new EVDBEntities();
      public V_adminUser AdminUserLogin(string sname, string spwd)
      {
          string newpwd = StringUtils.EncryptPassWord(spwd, StringUtils.PassFormat.MD5);
          return
              entities.V_adminUser.FirstOrDefault(
                  s => s.VA_loginname == sname && s.VA_password == newpwd && s.VA_IsEnable == 1);
      }
    }
}
